﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace ShortUrl.WebUI.Models
{
    public class UrlLink
    {
        [Key]
        public int Id { get; set; }

        [Index("IX_ShortUrl", IsUnique = true)]
        [MaxLength(10)]
        [Required]
        public string ShortKey { get; set; }

        [Index("IX_UrlLong", IsUnique = true)]
        [Required]
        [MaxLength(255)]
        public string UrlLong { get; set; }

        public DateTime CreatedDate { get; set; }

        public int VisitCount { get; set; }
    }
}